package com.cskaoyan.market.db.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
@AllArgsConstructor
@NoArgsConstructor
@Data
public class SelfMarketRegion {
    private Integer id;
    private Integer pid;
    private String name;
    private Byte type;
    private Integer code;
    private List<SelfMarketRegion> children;

    public SelfMarketRegion( MarketRegion marketRegion ) {
        this.id = marketRegion.getId();
        this.pid = marketRegion.getPid();
        this.name = marketRegion.getName();
        this.type = marketRegion.getType();
        this.code = marketRegion.getCode();
    }
}
